<script lang="ts" setup>
import PhotoCategory from "./PhotoCategory.vue";
import ArticleCategory from "./ArticleCategory.vue";
import RadioStation from "./RadioStation.vue";
import { HomeDeatilType } from "@/typing";
import { toRefs } from "vue";

const props = defineProps<{
  category: string,
  listItem: HomeDeatilType,
  index: number
}>()

const { listItem, category } = toRefs(props)
</script>

<!-- 主页文章动态组件 -->
<template>
  <div>
    <component
      :is="listItem.category == '0' ? PhotoCategory : listItem.category != '8' ? ArticleCategory : RadioStation"
      :category="category" :listItem="listItem" />
  </div>
</template>